<template>
	<view class="contents">
		<view style="background-color: #5CAF5D;height: 232rpx;">
			<view v-if='false' style="padding:40rpx 0 0  30rpx;">
				<text class="text1">已完成</text>
				<text class="text2">订单已完成，请到自提点提餐</text>
			</view>
			<view style="padding:40rpx 0 0  30rpx;">
				<text class="text1">订单配送中</text>
				<text class="text2">骑手订单配送中~</text>
			</view>
		</view>
		<view class="qucan_box">
			<view style="margin: auto;text-align: center;">
				<text style="display: block;margin-bottom: 30rpx;">CF1</text>
				<text>取餐号</text>
			</view>
		</view>
		<view class="food_list">
			<view class="item_content">
				<u-steps inactiveColor="#5caf5d" activeColor="#5caf5d" :current="address.state" direction="column">
					<u-steps-item :title="address.title" :desc="address.text">
					</u-steps-item>
					<u-steps-item :title="address.title1" :desc="address.text1">
					</u-steps-item>
				</u-steps>
			</view>
			<view class="food">
				<view class="contentss" v-for="item in listVal" :key="item.id">
					<view class="order1">
						<image style="width: 172rpx;height: 146rpx;display: block;" :src="item.imgurl" mode="">
						</image>
					</view>
					<view class="food_val">
						<view style="display: flex;justify-content: space-between;align-items: center;">
							<text class="qiguoji">{{item.name}}</text><text style="width: 50px;text-align: center;"
								class="input">X {{item.numberval}}</text>
						</view>
						<view
							style="display: flex;justify-content: space-between;margin-top: 66rpx;align-items: center;">
							<text class="y"></text><text class="price">{{'￥'+item.priceval}}</text>
						</view>
					</view>
				</view>
				<view class="food_">
					<p>共计：<text style="color: red;">￥435.00</text></p>
				</view>
			</view>
		</view>
		<view class="order_details">
			<view class="order_title">
				订单信息
			</view>
			<view class="details">
				<ul class="uls">
					<li class='lis'> <text>订单编号：</text> <text>6115444945123354 <text>复制</text></text></li>
					<li class='lis'> <text>下单时间：</text> <text>2024-01-01 14:14:14</text></li>
					<li class='lis'> <text>支付时间：</text> <text>2024-01-01 14:14:14</text></li>
				</ul>
			</view>
		</view>
		<view class="foot">
			<view
				style="width: 620rpx;height: 64rpx;background-color: #5CAF5D;border-radius: 52rpx;display: flex;justify-content: center;align-items: center;color:#fff">
				订单送达
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				active: 1,
				list1: [{
					title: '事件一'
				}, {
					title: '事件二'
				}, {
					title: '事件三'
				}, {
					title: '事件四'
				}],
				listVal: [{
					type: "warning",
					value: 100,
					name: "椒盐汽锅鸡",
					priceval: "122.00",
					imgurl: "../../static/img/food1.png",
					id: "1",
					numberval: 0
				}, {
					name: "麻辣汽锅鸡",
					priceval: "122.00",
					imgurl: "../../static/img/food1.png",
					id: "2",
					numberval: 0
				}, {
					name: "红烧汽锅鸡",
					priceval: "122.00",
					imgurl: "../../static/img/food1.png",
					id: "3",
					numberval: 0
				}],
				address: {
					state: 1,
					title: "成飞餐厅",
					text: "四川省成都市青羊区成飞公园产业园1号仓库",
					title1: "成飞自提1号点位",
					text1: "四川省成都市青羊区成飞公园产业园1号仓库",
				},
			}
		},
		methods: {
			valChange(e) {
				console.log('当前值eeeeee ', this.$refs.numberbox)
			},
			handelNumberBox(val, num) {
				this.listVal.forEach((item) => {
					if (item.id == num) {
						if (val == 'add') {
							item.numberval++
						} else if (val == 'del') {
							if (item.numberval == 0) {
								item.numberval = 0
							} else {
								item.numberval--
							}
						}
					} else {
						return
					}
				})
				console.log('this.listVal', this.listVal);
			},
		}
	}
</script>

<style lang="scss">
	.foot {
		padding: 50rpx 40rpx 80rpx 61rpx;
		background-color: #fff;
	}

	.food {
		margin-top: 30rpx;

		.food_ {
			display: flex;
			justify-content: flex-end;
			margin-top: 53rpx;
		}
	}

	.order_details {
		padding: 0 50rpx;
		width: 670rpx;
		background: #FFFFFF;
		box-shadow: 0rpx -6rpx 12rpx 2rpx rgba(0, 0, 0, 0.05);
		border-radius: 16rpx 16rpx 16rpx 16rpx;

		.order_title {
			padding-bottom: 20rpx;
			border-bottom: 4rpx dashed #E4E4E4;
			margin-bottom: 15rpx;
		}

		.details {
			.uls .lis {
				height: 50rpx;
				line-height: 50rpx;
				display: flex;
				justify-content: space-between;
				align-items: center;
			}
		}
	}

	.food_list {
		width: 660rpx;
		/* position: absolute; */
		/* top: 350rpx; */
		// left: 20rpx;
		background-color: #fff;
		padding: 85rpx 50rpx;
		border-radius: 16rpx;

		.val1 {
			margin-bottom: 20rpx;
		}
	}

	.qucan_box {
		/* position: absolute; */
		/* top: 186rpx; */
		/* left: 20rpx; */
		width: 710rpx;
		/* margin: auto; */
		padding-top: 36rpx;
		background-color: #FFFFFF;
		border-radius: 28rpx 28rpx 0 0;
		margin: -55rpx auto;
	}

	.steps_box {
		width: 610rpx;
		margin: auto;
		padding: 30rpx 65rpx 30rpx 65rpx;
		text-align: center;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.status-btn {
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		flex-direction: row;
		align-items: center;
		justify-content: center;
		height: 92rpx;
		margin: 30rpx;
		background-color: #007AFF;
	}

	.example-body {
		/* #ifndef APP-NVUE */
		display: block;
		/* #endif */
		padding: 15px;
		flex-direction: row;
	}

	.contentss {
		display: flex;
		justify-content: space-between;
		width: 650rpx;
		background-color: #fff;
		margin-bottom: 20rpx;

		.qiguoji {
			width: 224rpx;
			height: 44rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: bold;
			font-size: 32rpx;
			color: #333333;
			line-height: 44rpx;
			text-align: left;
			font-style: normal;
			text-transform: none;
			overflow: hidden;
			/* 隐藏超出的部分 */
			white-space: nowrap;
			/* 不换行 */
			text-overflow: ellipsis;
			/* 显示省略号 */
		}

		.price {
			width: 120rpx;
			height: 40rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: bold;
			font-size: 28rpx;
			color: #000;
			line-height: 40rpx;
			text-align: left;
			font-style: normal;
			text-transform: none;
		}

		.food_val {
			margin-left: 40rpx;
			width: 562rpx;
		}
	}

	.contents {
		width: 750rpx;
		background-color: #f5f5f5;

		.text1 {
			display: block;
			height: 44rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: bold;
			font-size: 32rpx;
			color: #FFFFFF;
			line-height: 44rpx;
		}

		.text2 {
			width: 378rpx;
			height: 40rpx;
			font-family: PingFang SC, PingFang SC;
			font-weight: 400;
			font-size: 28rpx;
			color: #FFFFFF;
			line-height: 40rpx;
		}
	}
</style>